using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Collections;
using System.Collections.Specialized;

namespace UMC.Web
{
    /// <summary>
    /// 文件上传对话框
    /// </summary>
    public class UIFileDialog : UIDialog
    {

        public UIFileDialog()
        {
            this.Title = "资源上传";
        }
        /// <summary>
        /// 对话框类型
        /// </summary>
        protected override string DialogType
        {
            get { return "File"; }
        }
        /// <summary>
        /// 上传的文件类型，只有PC端有效，其他端只能是图片或视频
        /// </summary>
        public string Accept
        {

            get
            {
                return this.Config["Accept"];
            }
            set
            {

                this.Config.Put("Accept", value);

            }
        }

        /// <summary>
        /// 是否是多文件
        /// </summary>
        public bool Multiple
        {

            get
            {
                return this.Config.ContainsKey("Multiple");
            }
            set
            {
                if (value)
                {
                    this.Config.Put("Multiple", true);
                }
                else
                {

                    this.Config.Remove("Multiple");
                }
            }
        }
        /// <summary>
        /// 是否支持上传目录
        /// </summary>
        public bool Dir
        {

            get
            {
                return this.Config.ContainsKey("Dir");
            }
            set
            {
                if (value)
                {
                    this.Config.Put("Dir", true);
                }
                else
                {

                    this.Config.Remove("Dir");
                }
            }
        }
    }
}
